import { HTMLElement } from 'node-html-parser';
import s from './ns';
import P01 from './P01';
import { IFeidaoAiNodejsComponent } from '@feidao/web/interfaces';
import nodejs from '@feidao/web/atom/nodejs/msg-b/nodejs';
import render from '@feidao/web/atom/nodejs/render/render';
import init from '@feidao/web/framework/nodejs/d/component';

const daoke = {
	async init(fd: IFeidaoAiNodejsComponent, ...args: any[]) {
		console.log('zj-distribute-list-001 init nb', args);
		const layout_no = fd.data.params.layout_no || 'BP10020';//todo
		console.log(layout_no);
		const res = await nodejs("flippedclass", "distribute_list_find", { layout_no });
		render(fd.data.node, res, P01, 'P01');
	}
};
export default function main(html: HTMLElement, url: string, query: any) {
	return init('zj-distribute-list-001', s, daoke, html, url, query, { spaceid: 'flippedclass', systemid: '5991', refsystemid: '@refsystemid' });
}
